<TreeViewLabel>:
    width: self.texture_size[0]
    height: max(self.texture_size[1], 24)
    text_size: self.width, None

<TreeViewBlankNode>:
    height: 0

<TreeViewNode>:
    canvas.before:
        Clear
        Color:
            rgba: 1, 1, 1, int(not self.is_leaf)
        Rectangle:
            source: 'data/images/tree_%s.png' % ('opened' if self.is_open else 'closed')
            size: 16, 16
            pos: self.x - 20, self.center_y - 8
    canvas.after:
        Clear
        Color:
            rgba: self.color_selected if self.is_selected else self.odd_color if self.odd else self.even_color
        Rectangle:
            pos: [self.treeview.internal_x(self.x), self.y] # the self.x arg is here only to bind this pos to self...
            size: [self.treeview.internal_width(self.width), self.height] # if self.parent else [1, 1]
        Color:
            rgba: .5, .5, .5, .2
        Line:
            points: [self.treeview.internal_x(self.x), self.y, self.treeview.internal_right(self.width), self.y] # arguments are dummy (see above comment)

<TreeViewHeaderNode>:
    canvas.before:
        Clear
    canvas.after:
        Clear

<TreeViewHeaderWidget>:
    edge_width: int(self.width *0.04)
    height: self._wrapped_wid.height
    canvas.after:
        Color:
            rgba: .5, .5, .5, .3
        Line:
            points: [self.right,self.y, self.right, self.y+self.height]

<TreeView>:
    size_hint: (1,1)    
    #height: self.minimum_height


    
